<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="layui/css/layui.css" />
		<script type="text/javascript" src="jquery-1.9.1.js"></script>
	</head>

	<body>
		<div class="layui-layout layui-layout-admin">
		  <div class="layui-header">
		    <div class="layui-logo">阿帕大陆</div>
		    <!-- 头部区域（可配合layui已有的水平导航） -->
		    <ul class="layui-nav layui-layout-left">
		      <li class="layui-nav-item"><a onclick="f8()">角色信息</a></li>
		      <!--<li class="layui-nav-item"><a href="">仓库管理</a></li>-->
		      <li class="layui-nav-item"><a onclick="f9()">装备信息</a></li>
		    </ul>
		    <ul class="layui-nav layui-layout-right">
		      <li class="layui-nav-item">
		          	欢迎&nbsp;&nbsp;<span></span>
		      </li>
		      <li class="layui-nav-item"><a href="index.html">退出游戏</a></li>
		    </ul>
		  </div>
		  
		  <div class="layui-side layui-bg-black">
		    <div class="layui-side-scroll">
		      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
		      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
		        <li class="layui-nav-item layui-nav-itemed">
		          <a class="" href="javascript:;">冒险</a>
		          <dl class="layui-nav-child">
		            <dd><a href="javascript:;" onclick="f5()">魔塔之行</a></dd>
		            <dd><a href="javascript:;" onclick="f6()">深渊涅槃</a></dd>
		            <dd><a href="javascript:;" onclick="f7()">天谭坠魔</a></dd>
		          </dl>
		        </li>
		        <li class="layui-nav-item">
		          <a href="javascript:;">主线</a>
		          <dl class="layui-nav-child">
		            <dd><a href="javascript:;" onclick="f2()">&nbsp;&nbsp;绿茵之林</a></dd>
		            <dd><a href="javascript:;" onclick="f3()">&nbsp;&nbsp;天空之城</a></dd>
		            <dd><a href="javascript:;" onclick="f4()">&nbsp;&nbsp;混沌天界</a></dd>
		            <dd><a href="javascript:;">&nbsp;&nbsp;贝尔玛尔公国</a></dd>
		            <dd><a href="javascript:;">&nbsp;&nbsp;瘟疫之源</a></dd>
		            <dd><a href="javascript:;">&nbsp;&nbsp;阿帕大陆之魂</a></dd>
		            <dd><a href="javascript:;">&nbsp;&nbsp;新纪元</a></dd>
		          </dl>
		        </li>
				  <li class="layui-nav-item"><a href="">幸运抽奖</a></li>
				  <li class="layui-nav-item"><a href="">关于我们</a></li>
		      </ul>
		    </div>
		  </div>
		  <div class="layui-body" style="margin-top: -10px" >
			  <iframe class="iframe1" src="stroy01.html" frameborder="0" width="1336" scrolling="No" height="650" leftmargin="0" topmargin="0"></iframe>
		  </div>
			  <font color="#5f9ea0" size="5px" face="华文彩云">勇士，欢 迎 来 到 阿 帕 大 陆，开 启 你 的 修 炼 之 路 吧！！</font>
		  </div>
		</div>
		<script src="layui/layui.all.js"></script>
	<script type="text/javascript">
		$iframe = $(".iframe1");
		function f2() {//绿茵之林
            $iframe.attr("src","stroy01.html")
        }
        function f3() {//天空之城
            $iframe.attr("src","stroy02.html")
        }
        function f4() {//混沌天界
            $iframe.attr("src","stroy03.html")
        }
        function f5() {//魔塔之行
            $iframe.attr("src","copy01.html")
        }
        function f6() {//深渊涅槃
            $iframe.attr("src","copy02.html")
        }
        function f7() {//天谭坠魔
            $iframe.attr("src","copy03.html")
        }

        function f8() {//角色信息
            $.ajax({
                "url": "/getinf.action",
                "type": "get",
                "data": "",
                "success": function (data, msg, xhr) {
                    console.log(data);
                    alert("用户名: "+data.username+"\n"+
                            "性别: "+data.sex+"\n"+
                            "职业: "+data.occupation+"\n"+
                            "力量: "+data.strength+"\n"+
                            "体力: "+data.physicial+"\n"+
                            "智力: "+data.intellige+"\n"+
                            "物攻: "+data.pattack+"\n"+
                            "魔攻: "+data.mattack+"\n"+
                            "生命值: "+data.life+"\n"+
                            "魔法: "+data.magic+"\n"+
							"经验："+data.rank+"\n")
                },
                "error": function () {
                    console.log("失败...");
                }
            });
        }
        
        function f9() {//装备信息
			var i;
			var equip=""
            $.ajax({
                "url": "/geteqinf.action",
                "type": "get",
                "data": "",
                "success": function (data, msg, xhr) {
                    for(i=0;i<data.length;i++){
                        equip = equip+data[i].name+"\n"
					}
					alert(equip)
                },
                "error": function () {
                    console.log("失败...");
                }
            });
        }
	</script>
	</body>
</html>